package com.ruoyi.his.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.his.mapper.DrugInventoryMapper;
import com.ruoyi.his.domain.DrugInventory;
import com.ruoyi.his.service.IDrugInventoryService;

/**
 * 药品库存记录Service业务层处理
 * 
 * @author hzr
 * @date 2025-05-21
 */
@Service
public class DrugInventoryServiceImpl implements IDrugInventoryService 
{
    @Autowired
    private DrugInventoryMapper drugInventoryMapper;

    /**
     * 查询药品库存记录
     * 
     * @param id 药品库存记录主键
     * @return 药品库存记录
     */
    @Override
    public DrugInventory selectDrugInventoryById(Long id)
    {
        return drugInventoryMapper.selectDrugInventoryById(id);
    }

    /**
     * 查询药品库存记录列表
     * 
     * @param drugInventory 药品库存记录
     * @return 药品库存记录
     */
    @Override
    public List<DrugInventory> selectDrugInventoryList(DrugInventory drugInventory)
    {
        return drugInventoryMapper.selectDrugInventoryList(drugInventory);
    }

    /**
     * 新增药品库存记录
     * 
     * @param drugInventory 药品库存记录
     * @return 结果
     */
    @Override
    public int insertDrugInventory(DrugInventory drugInventory)
    {
        return drugInventoryMapper.insertDrugInventory(drugInventory);
    }

    /**
     * 修改药品库存记录
     * 
     * @param drugInventory 药品库存记录
     * @return 结果
     */
    @Override
    public int updateDrugInventory(DrugInventory drugInventory)
    {
        return drugInventoryMapper.updateDrugInventory(drugInventory);
    }

    /**
     * 批量删除药品库存记录
     * 
     * @param ids 需要删除的药品库存记录主键
     * @return 结果
     */
    @Override
    public int deleteDrugInventoryByIds(Long[] ids)
    {
        return drugInventoryMapper.deleteDrugInventoryByIds(ids);
    }

    /**
     * 删除药品库存记录信息
     * 
     * @param id 药品库存记录主键
     * @return 结果
     */
    @Override
    public int deleteDrugInventoryById(Long id)
    {
        return drugInventoryMapper.deleteDrugInventoryById(id);
    }
}
